namespace LS.Digitize
{
    public struct WriteCollectionScope: IScope
    {
        public IWriter Writer { get; private set; }
        
        public WriteCollectionScope(IWriter writer)
        {
            Writer = writer;
            writer.StartWriteCollection();
        }
        
        public void Dispose()
        {
            Writer.EndWriteCollection();
            Writer = null;
        }
    }
}